﻿<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="ucPostas.ascx.vb" Inherits="SIAVU.ucPostas" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.1, Version=10.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"  Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxScheduler.v10.1, Version=10.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"  Namespace="DevExpress.Web.ASPxScheduler" TagPrefix="dxwschs" %>
<%@ Register assembly="DevExpress.XtraScheduler.v10.1.Core, Version=10.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraScheduler" tagprefix="cc1" %>
<%@ Register assembly="DevExpress.Web.v10.1, Version=10.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx" %>
<%@ Register src="ucCustomAppointmentTemplate.ascx" tagname="ucCustomAppointmentTemplate" tagprefix="uc1" %>
<div>


<dxwschs:ASPxScheduler ID="schedulerPostas" runat="server" ClientInstanceName="schedulerPostas"
    ActiveViewType="Timeline" AppointmentDataSourceID="odsActividades" 
    Start="2010-08-01" GroupType="Resource" ResourceDataSourceID="odsDestinos">
    <OptionsToolTips ShowAppointmentDragToolTip="False" ShowSelectionToolTip="False" AppointmentToolTipCornerType="None" />
    <OptionsBehavior  ShowViewVisibleInterval="True" ShowViewSelector="False" ShowViewNavigator="False" ShowTimeMarker="False" />
    
    <OptionsCustomization AllowAppointmentDrag="None" AllowAppointmentDragBetweenResources="None" AllowAppointmentMultiSelect="False" 
        AllowAppointmentCopy="None" AllowAppointmentCreate="None" AllowAppointmentDelete="None" AllowAppointmentEdit="None" 
        AllowAppointmentResize="None" AllowDisplayAppointmentForm="Always" AllowInplaceEditor="None"></OptionsCustomization>
    <OptionsView NavigationButtons-Visibility="Never" />
    <OptionsToolTips AppointmentTooltipUrl="/Presentacion/Controles/ucCustomAppointmentToolTipPostas.ascx" 
        AppointmentToolTipCornerType="None" />
    <Storage EnableReminders="False">
        <Appointments>
            <Mappings AppointmentId="ActividadID" Description="InformacionCompleta" 
                Start="FechaInicioFicticia" End="FechaFinFicticia" ResourceId="CiudadDestidoID" 
                Label="TipoActividadID" Status="EstadoActividad" />
            <CustomFieldMappings>
                <dxwschs:ASPxAppointmentCustomFieldMapping Member="CantidadComisariosSubscriptos" Name="CantidadComisariosSubscriptos" 
                    ValueType="Integer" />
            </CustomFieldMappings>
            <statuses>
                <cc1:AppointmentStatus DisplayName="Libre" MenuCaption="&amp;Libre" 
                    Type="Free" />
                <cc1:AppointmentStatus Color="74, 135, 226" DisplayName="Otra2" 
                    MenuCaption="&amp;Otra2" Type="Tentative" />
                <cc1:AppointmentStatus Color="74, 135, 226" DisplayName="Confirmada" 
                    MenuCaption="&amp;Confirmada" Type="Busy" />
                <cc1:AppointmentStatus Color="217, 83, 83" DisplayName="Otra1" 
                    MenuCaption="&amp;Otra1" Type="OutOfOffice" />
            </statuses>
            <labels>
                <cc1:AppointmentLabel Color="Window" DisplayName="None" 
                    MenuCaption="&amp;None" />
                <cc1:AppointmentLabel Color="32, 64, 124" DisplayName="Posta" MenuCaption="&amp;Posta" />
                <cc1:AppointmentLabel Color="White" DisplayName="Dia Libre" MenuCaption="&amp;Dia Libre" />
                <cc1:AppointmentLabel Color="144, 201, 72" DisplayName="Dia Sin Programar" MenuCaption="&amp;Dia Sin Programar" />
                <cc1:AppointmentLabel Color="243, 228, 199" DisplayName="Vacation" 
                    MenuCaption="&amp;Vacation" />
                <cc1:AppointmentLabel Color="244, 206, 147" DisplayName="Must Attend" 
                    MenuCaption="Must &amp;Attend" />
                <cc1:AppointmentLabel Color="199, 244, 255" DisplayName="Travel Required" 
                    MenuCaption="&amp;Travel Required" />
                <cc1:AppointmentLabel Color="207, 219, 152" DisplayName="Needs Preparation" 
                    MenuCaption="&amp;Needs Preparation" />
                <cc1:AppointmentLabel Color="224, 207, 233" DisplayName="Birthday" 
                    MenuCaption="&amp;Birthday" />
                <cc1:AppointmentLabel Color="141, 233, 223" DisplayName="Anniversary" 
                    MenuCaption="&amp;Anniversary" />
                <cc1:AppointmentLabel Color="255, 247, 165" DisplayName="Phone Call" 
                    MenuCaption="Phone &amp;Call" />
            </labels>
        </Appointments>
        <Resources>
            <Mappings Caption="Descripcion" ResourceId="CiudadID" />
        </Resources>
    </Storage>
    <Views>
        <DayView Enabled="False"><TimeRulers>
            <cc1:TimeRuler></cc1:TimeRuler>
            </TimeRulers>
        </DayView>

        <WorkWeekView Enabled="False"><TimeRulers>
        <cc1:TimeRuler></cc1:TimeRuler>
        </TimeRulers>
        </WorkWeekView>
            
        <WeekView Enabled="False">
        </WeekView>
        
        <MonthView Enabled="False">
        </MonthView>
            
        <TimelineView IntervalCount="31">
            <Scales>
                <cc1:TimeScaleYear Enabled="False" />
                <cc1:TimeScaleQuarter Enabled="False" Visible="False" />
                <cc1:TimeScaleMonth Enabled="False" Visible="False" />
                <cc1:TimeScaleWeek Enabled="False" Visible="False" />
                <cc1:TimeScaleDay />
                <cc1:TimeScaleHour Enabled="False" Visible="False" />
                <cc1:TimeScaleFixedInterval Enabled="False" Visible="False" />
            </Scales>
            <TimelineViewStyles VerticalResourceHeader-Width="75px" EnableDefaultAppearance="False">
                <TimelineCellBody Height="45px">
                </TimelineCellBody>

                <AlternateTimelineDateHeader>
                    <Paddings Padding="0px" PaddingBottom="0px" PaddingLeft="0px" 
                        PaddingRight="0px" PaddingTop="0px" />
                </AlternateTimelineDateHeader>

            <VerticalResourceHeader Width="75px"></VerticalResourceHeader>
                <Appointment Wrap="False">
                </Appointment>
            </TimelineViewStyles>
            <AppointmentDisplayOptions StartTimeVisibility="Never" ShowRecurrence="False" 
                ShowReminder="False" EndTimeVisibility="Never" 
                 AppointmentHeight="30" />
		    <%--<Templates>
			    <HorizontalAppointmentTemplate>
				    <uc1:ucCustomAppointmentTemplate ID="UcCustomAppointmentTemplate1" runat="server" />
			    </HorizontalAppointmentTemplate>
		    </Templates>--%>
        </TimelineView>
     </Views>
     <ClientSideEvents AppointmentDoubleClick="function(s, e) {
                e.handled = true;
                schedulerPostas.RaiseCallback('MNUAPT|OpenAppointment'); 
                    if (window.location.pathname.toUpperCase() == '/Presentacion/ConfirmarTripulantes.aspx'.toUpperCase())
                    {
                      gvTripulantes.Refresh();
                    }
                    else
                    {
                       if (window.location.pathname.toUpperCase() == '/Presentacion/PreProgramacion.aspx'.toUpperCase())
                        {
                          scheMiProgramacion.RaiseCallback('REFRESH|');
                        }
                        if (window.location.pathname.toUpperCase() == '/Presentacion/ReprogramarTripulantes.aspx'.toUpperCase())
                        {
                          scheMiProgramacion.RaiseCallback('REFRESH|');
                        }
                    }
                }"/>

      <%--<ClientSideEvents AppointmentDoubleClick="function(s, e) {
                var apt = schedulerPostas.GetAppointmentById(e.appointmentId);         
                schedulerPostas.RefreshClientAppointmentProperties(apt,AppointmentPropertyNames.Normal,ShowAppointmentInfo);
                e.handled = true; }"/>--%>
                
</dxwschs:ASPxScheduler>

</div>

<asp:ObjectDataSource ID="odsActividades" runat="server" 
    SelectMethod="GetActividadesPostaDestino" 
    TypeName="SIAVU.Dominio.EntityManager">
    <SelectParameters>
        <asp:ControlParameter ControlID="PeriodoSeleccion" Name="Periodo" PropertyName="SelectedDate" Type="DateTime" />
    </SelectParameters>
</asp:ObjectDataSource>
    
<asp:ObjectDataSource ID="odsDestinos" runat="server" 
    SelectMethod="GetDestinosSinBuenosAires" 
    TypeName="SIAVU.Dominio.EntityManager">
</asp:ObjectDataSource>

<asp:Calendar ID="PeriodoSeleccion" runat="server" Visible="False"></asp:Calendar>







